﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;
using System.IO;

namespace CommunityServerRest {
	[XmlRoot("BlogPostList")]
	public class BlogPostList {
		[XmlElement("BlogPost")]
		public BlogPost[] blogPosts { get; set; }

		internal static BlogPostList Deserialize(System.IO.Stream stream) {
			XmlSerializer serializer = new XmlSerializer(typeof(BlogPostList));
			StreamReader reader = new StreamReader(stream);
			BlogPostList postList = (BlogPostList)serializer.Deserialize(reader);
			reader.Close();
			return postList;
		}
	}
}
